package com.wangxl.girl.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wangxl.girl.domain.Girl;
import com.wangxl.girl.repository.GirlRepository;

@Service
public class GirlService
{
	@Autowired
	private GirlRepository girlRepository;
	@Transactional
	public void insertTwo()
	{
		Girl girlA = new Girl();
		girlA.setName("小雨");
		girlA.setAge(16);
		girlA.setCupSize("B");
		girlA.setHeight(160);
		girlA.setWeight(75);
		girlRepository.save(girlA);
		
		Girl girlB = new Girl();
		girlB.setName("小月");
		girlB.setAge(17);
		girlB.setCupSize("DDD");
		girlB.setHeight(162);
		girlB.setWeight(80);
		girlRepository.save(girlB);
	}

}
